﻿@{
    ViewBag.Title = ViewBag.BlogUserName + "的留言板 - 小博客";
    Layout = "~/Views/Shared/_BlogLayout.cshtml";
}
@using MyBlog
<link href="~/Content/Blog/mess.css" rel="stylesheet" />
<div>
    <div class="umess-head">
        留言板
    </div>
    <div style="clear:both; margin-left:5px;">
        <div class="umess-edit">
            <span class="umess-sp1">主人寄语</span>
            @if (UserSession.LoginUserInfo != null && UserSession.LoginUserInfo.Account.Same(ViewContext.RouteData.Values["username"].ToString()))
            {
                <span class="inline-b"><a style="text-decoration:underline;color:red;" href="javascript:;" onclick="showEdit()"><i class="icon-edit"></i> 编辑您的寄语</a></span>
            }
        </div>
        <div id="dvuserword" class="ueditorContent usay">
        </div>
        <div id="dvusertosay" style="display:none;padding:5px; ">
            <script id="dveditword" name="dveditword" style="min-height:200px;margin-top:10px; width:100%; margin-bottom:5px;" type="text/plain">
            </script>
            <input type="button" value="发表" class="btnNormal" onclick="save()" />
            <input type="button" value="取消" class="btnNormal" onclick="cancel()" />
        </div>
    </div>
    <div id="dvBg" class="dv-bg-shade">
    </div>
    <div class="umess-list-tip">
        留言列表(<span id="spcount">@ViewBag.total</span>)
        <div class="umess-spbtn"><a href="javascript:;" onclick="goSend()">我要留言 <i class="icon-edit"></i></a></div>
    </div>
    <div class="laypage" id="layerpage"></div>
    <div id="dvmsglist">
    </div>
    <div id="dvSendView" class="umess-sendview">
        <div class="umess-send-head">
            发表留言 <i class="icon-edit"></i>
        </div>
        <div style="clear:both;margin-top:10px;padding:5px;">
            @if (UserSession.LoginUserInfo != null)
            {
                <div style="clear:both;">当前用户：<span>@UserSession.LoginUserInfo.NickName</span></div>
                <script id="content" name="content" style="height:120px; margin-top:10px; width:100%; margin-bottom:5px;" type="text/plain">
                </script>
                <input type="hidden" id="huid" value="@ViewContext.RouteData.Values["username"].ToString()" />
                <input type="hidden" id="hpage" value="@ViewBag.TotalPage" />
                <input type="hidden" id="hID" value="0" />
                <div style="clear:both; padding-bottom:3px;">
                    <input type="button" id="btnok" value="提交" class="btnsubmit" />
                </div>
            }
            else
            {
                <div id="_logintip" class="login-tip">
                    系统提示：登录后才能回复和留言，请先<a href="@Url.Content("~/account/login?ReturnUrl="+Request.Url)">[登录]</a>或前往<a href="@Url.Content("~/account/register")">[注册]</a>
                </div>
            }
        </div>
    </div>
</div>
<script src="~/Scripts/Blog/usermsg.js"></script>